{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 第一次练习\n",
    "\n",
    "- 把\"Hello World\"保存到一个变量里，并且print出来。\n",
    "- 把一个文本信息保存到一个变量里，print出来，存一个新的文本信息到同一个变量里，print这个新信息。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   Hello World   \n",
      "追忆似水年华\n",
      "Hello World\n"
     ]
    }
   ],
   "source": [
    "uni_name=\"   Hello World   \"\n",
    "print(uni_name)\n",
    "\n",
    "uni_name = \"追忆似水年华\"\n",
    "print(name)\n",
    "\n",
    "uni_name=\"   Hello World   \"\n",
    "print(uni_name.strip())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 去掉上例中变量uni_name里的前后空格。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello World会计学院\n",
      "Hello World\t会计学院\n",
      "Hello World\n",
      "会计学院\n"
     ]
    }
   ],
   "source": [
    "# 其他学院的同学可以将school改为自己学院名称\n",
    "\n",
    "school='会计学院'\n",
    "uni_name=\"Hello World\"\n",
    "print(uni_name + school)\n",
    "\n",
    "school='会计学院'\n",
    "uni_name=\"Hello World\"\n",
    "print(uni_name + \"\\t\" + school)\n",
    "\n",
    "school='会计学院'\n",
    "uni_name=\"Hello World\"\n",
    "print(uni_name + \"\\n\" + school)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 请将uni_name和school合并起来并打印出来。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 请在uni_name和school之间加入一个制表符并打印出来，然后在uni_name和school间换一行再打印出来。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "叶莉比姚明低36cm\n"
     ]
    }
   ],
   "source": [
    "height_yao = 226\n",
    "height_ye = 190\n",
    "print(\"叶莉比姚明低\" + str(height_yao - height_ye)+ \"cm\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 姚明的身高是226cm，叶莉的身高是190cm，请以文本和数字混排的形式，打印“叶莉比姚明低XXcm”，XX请在print中计算得到。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
